HTML attributes and table tags
HTML attributes provides additional information about the element:- Attributes are always specified in the opening tag
- Attributes usually consist of a name="value" pairing, for example: border="1"
- All HTML elements can have attributes
table1.html
<table border="1"> <tr> <td>Top-left cell</td> <td>Top-right cell</td> </tr> <tr> <td>Bottom-left cell</td> <td>Bottom-right cell</td> </tr> </table>
table2.html
<table border="1"> <tr> <td colspan="2">This table data cell spans two columns.</td> </tr> <tr> <td>Bottom-left cell</td> <td>Bottom-right cell</td> </tr> </table>
table3.html
<table border="1"> <tr> <td colspan="2">This table data cell spans two columns.</td> </tr> <tr> <td rowspan="2">This table data cell spans two rows.</td> <td>Middle-right cell</td> </tr> <tr> <!-- the tr stands for table row. --> <td>Bottom-right cell</td> </tr> </table>